package com.zh.api.controller.common;

import com.zh.common.base.BaseController;
import com.zh.common.domain.UserDO;
import com.zh.common.service.UserService;
import com.zh.common.utils.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ProjectName: healthCare-parent
 * @Package: com.zh.api.controller.common
 * @ClassName: UserController
 * @Description: java类作用描述
 * @Author: lds
 * @CreateDate: 2019/5/31 0031 14:19
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/5/31 0031 14:19
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@RestController
@RequestMapping("/user")
@Api("用户相关")
public class UserController extends BaseController{

    @Autowired
    private UserService userService;

    @RequestMapping(value = "getAllOldUser", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
    @ApiOperation("获取所有老人")
    public ResultVO getAllFamilyUser(){
        Map params=new HashMap<>();
        params.put("userType",1);
        List<UserDO> list = userService.list(params);
        return ResultVO.success(list);
    }
}
